/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template
 */
package org.sbbs.base.jpa.manager;

import java.io.Serializable;
import java.util.List;
import org.sbbs.base.jpa.dao.BaseTreeRepo;
import org.sbbs.base.jpa.entity.BaseTreeEntity;
import org.springframework.data.jpa.repository.Query;

/**
 *
 * @author jenkins
 */
public interface BaseTreeManager<T extends BaseTreeEntity, ID extends Serializable, R extends BaseTreeRepo> extends BaseManager<T, ID, R> {

    public static Long rootId = 0l;

    public List<T> findChildren(T pid);

    public Boolean hasChildren(T p);

    public void updateChildrenSort(List<T> children);
    
//        public List<T> findByPidOrderBySort(Long pid);
    
    public List<Long> findIdByPidOrderBySort(Long pid);

}
